<template>
    <div>
        <Header></Header>
        <div class="content">
        <el-row>
            <div style="margin-top: 80px;margin-left:180px">
                <h3>{{$t('company.companyInfo')}}</h3>
            </div>
            <el-col :span="9" :offset="8">
                <el-form :model="addForm" :rules="addRules" ref="addForm" label-width="80px">
                    <el-form-item :label="$t('register.companyName')" prop="title" label-width="180px">
                        <el-input v-model="addForm.title" style="width: 90%" :disabled="!!addForm.id"></el-input>
                    </el-form-item>
                    <el-form-item :label="$t('company.contact')" prop="contact" label-width="180px">
                        <el-input v-model="addForm.contact" style="width: 90%" :disabled="flag"></el-input>
                    </el-form-item>
                    <el-form-item :label="$t('company.contactPhone')" prop="phone" label-width="180px">
                        <el-input v-model="addForm.phone" style="width: 90%" :disabled="flag"></el-input>
                    </el-form-item>
                    <el-form-item :label="$t('company.companyMail')" prop="email" label-width="180px">
                        <el-input v-model="addForm.email" style="width: 90%" :disabled="flag" maxlength="50"></el-input>
                    </el-form-item>
                    <el-form-item :label="$t('company.companyAdd')" prop="address" label-width="180px">
                        <el-input v-model="addForm.address" style="width: 90%" :disabled="flag"></el-input>
                    </el-form-item>
                    <el-form-item :label="$t('company.resolvingPower')" prop="resolution" label-width="180px">
                        <el-select v-model="addForm.resolution" style="width: 90%" :disabled="flag">
                            <el-option v-for="type in resolutionTypes" :key="type.value" :label="type.label"
                                       :value="type.value"></el-option>
                        </el-select>
                    </el-form-item>
                    <!--
                    <el-form-item label="总时长（小时）" prop="totalDuration" label-width="120px">
                        <el-input v-model="addForm.totalDuration" style="width: 90%" :disabled="flag"></el-input>
                    </el-form-item>-->
                </el-form>
                <div v-if="flag">
                    <el-button @click="jumpBack" style="margin-left: 150px">{{$t('standard.return')}}</el-button>
                </div>
                <div v-else>
                    <el-button @click="jumpBack" style="margin-left:120px;width:15%">{{$t('standard.return')}}</el-button>
                    <el-button type="primary" @click="saveOrUpdateUser" style="margin-left:120px;width:15%" >{{$t('standard.confirm')}}</el-button>
                </div>

            </el-col>
        </el-row>
        <div v-show="!add_sub">
            <hr/>
            <el-row style="margin-left: 120px">
                <el-button style="height:100px;width: 200px;font-size: 20px;color: #8c939d" @click="skipFace(addForm.id)">{{$t('header.faceRecognition')}}
                </el-button>
                <el-button style="height:100px;width: 200px;font-size: 20px;color: #8c939d" @click="skipImg(addForm.id)">{{$t('header.imageRecognition')}}
                </el-button>
                <!--远程协作入口，暂时屏蔽-->
                <!--<el-button style="height:100px;width: 200px;font-size: 20px;color: #8c939d" @click="skipMeeting(addForm.id)">{{$t('header.videoConference')}}-->
                <!--</el-button>-->
            </el-row>
        </div>
        </div>
    </div>
</template>

<script>
    import companyadd from './companyadd'

    export default companyadd;

</script>

<style>
    .search-form-row {
        text-align: left;
        padding-left: 20px;
    }

    .el-container {
        margin-bottom: 10px;
        margin-top: 70px;
    }

    .word-break {
        width: 300px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
</style>
